#ifndef _VIDEO_H_
#define _VIDEO_H_

class CWindow
{
private:
	typedef struct
	{
		int width;
		int height;
		int bpp;
		bool fullscreen;
	}TSettings;

	TSettings m_current;
	TSettings m_desired;
	bool m_inited;

	bool Create();
	void Destroy();
public:
	CWindow();
	~CWindow();

	void SetWidth(int width) {m_desired.width = width;}
	int GetWidth() {return m_current.width;}

	void SetHeight(int height) {m_desired.height = height;}
	int GetHeight() {return m_current.height;}

	void SetBPP(int bpp) {m_desired.bpp = bpp;}
	int GetBPP() {return m_current.bpp;}

	void SetFullscreen(bool fullscreen) {m_desired.fullscreen = fullscreen;}
	bool IsFullscreen() {return m_current.fullscreen;}

	bool IsInited() {return m_inited;}

	bool Apply();
	void Flip();
	bool PumpMessages();
};

#endif //_VIDEO_H_